import request from '@/plugins/axios'

export function fetchList(query) {
  return request({
    url: '/api/budgetaddapply/page2',
    method: 'get',
    params: query
  })
}

export function fetchList2(query) {
    return request({
        url: '/api/budgetaddapply/page',
        method: 'get',
        params: query
    })
}

export function addObj(obj) {
  return request({
    url: '/api/budgetaddapply',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/api/budgetaddapply/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/api/budgetaddapply/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/api/budgetapply',
    method: 'put',
    data: obj
  })
}

export function putObj2(obj) {
    return request({
        url: '/api/budgetaddapply/updateApplyData',
        method: 'put',
        data: obj
    })
}

export function putObj3(obj) {
    return request({
        url: '/api/budgetaddapply/updateApplyData2',
        method: 'put',
        data: obj
    })
}

export function getBudgetApply(busiId) {
    return request({
        url: '/api/budgetaddapply/getBudgetApply/' + busiId,
        method: 'get'
    })
}

export function getItem(applyId) {
    return request({
        url: '/api/budgetaddapply/getItem/' + applyId,
        method: 'get'
    })
}

export function getItem2(applyId) {
    return request({
        url: '/api/budgetaddapply/getItem2/' + applyId,
        method: 'get'
    })
}

export function startBudgetAdd(obj) {
    return request({
        url: '/api/budgetaddapply/startBudgetAdd',
        method: 'post',
        data: obj
    })
}

export function initParameter(obj) {
    return request({
        url: '/api/budgetaddapply/initParameter',
        method: 'post',
        data: obj
    })
}
